/**
 * <copyright>
 * </copyright>
 *

 */
package info.unlp.tesis.qvtoperational.impl;

import info.unlp.tesis.qvtoperational.Bool;
import info.unlp.tesis.qvtoperational.BooleanLiteralExp;
import info.unlp.tesis.qvtoperational.QvtoperationalPackage;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Boolean Literal Exp</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link info.unlp.tesis.qvtoperational.impl.BooleanLiteralExpImpl#getBooleanSymbol <em>Boolean Symbol</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class BooleanLiteralExpImpl extends OCLExpressionImpl implements BooleanLiteralExp
{
  /**
   * The default value of the '{@link #getBooleanSymbol() <em>Boolean Symbol</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getBooleanSymbol()
   * @generated
   * @ordered
   */
  protected static final Bool BOOLEAN_SYMBOL_EDEFAULT = Bool.TRUE_VALUE;

  /**
   * The cached value of the '{@link #getBooleanSymbol() <em>Boolean Symbol</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getBooleanSymbol()
   * @generated
   * @ordered
   */
  protected Bool booleanSymbol = BOOLEAN_SYMBOL_EDEFAULT;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected BooleanLiteralExpImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  protected EClass eStaticClass()
  {
    return QvtoperationalPackage.Literals.BOOLEAN_LITERAL_EXP;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Bool getBooleanSymbol()
  {
    return booleanSymbol;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setBooleanSymbol(Bool newBooleanSymbol)
  {
    Bool oldBooleanSymbol = booleanSymbol;
    booleanSymbol = newBooleanSymbol == null ? BOOLEAN_SYMBOL_EDEFAULT : newBooleanSymbol;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, QvtoperationalPackage.BOOLEAN_LITERAL_EXP__BOOLEAN_SYMBOL, oldBooleanSymbol, booleanSymbol));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
      case QvtoperationalPackage.BOOLEAN_LITERAL_EXP__BOOLEAN_SYMBOL:
        return getBooleanSymbol();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
      case QvtoperationalPackage.BOOLEAN_LITERAL_EXP__BOOLEAN_SYMBOL:
        setBooleanSymbol((Bool)newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
      case QvtoperationalPackage.BOOLEAN_LITERAL_EXP__BOOLEAN_SYMBOL:
        setBooleanSymbol(BOOLEAN_SYMBOL_EDEFAULT);
        return;
    }
    super.eUnset(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
      case QvtoperationalPackage.BOOLEAN_LITERAL_EXP__BOOLEAN_SYMBOL:
        return booleanSymbol != BOOLEAN_SYMBOL_EDEFAULT;
    }
    return super.eIsSet(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public String toString()
  {
    if (eIsProxy()) return super.toString();

    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (booleanSymbol: ");
    result.append(booleanSymbol);
    result.append(')');
    return result.toString();
  }

} //BooleanLiteralExpImpl
